var win = Titanium.UI.createWindow({
	backgroundColor: '#cdc9c9',
	height : '100%',
	width : '100%',
});

var vreme_window = Ti.UI.createWindow({
	url: '/Storitve/vreme.js',
	backgroundColor: '#cdc9c9',
	borderColor: '#000000',
	height : '100%',
	width : '100%',
});

var feriNovice_window = Ti.UI.createWindow({
	url: '/Storitve/feriNovice.js',
	backgroundColor: '#cdc9c9',
	borderColor: '#000000',
	height : '100%',
	width : '100%',
});

var feriForum_window = Ti.UI.createWindow({
	url: '/Storitve/feriForum.js',
	backgroundColor: '#cdc9c9',
	borderColor: '#000000',
	height : '100%',
	width : '100%',
});

var stuk_window = Ti.UI.createWindow({
	url: '/Storitve/stuk.js',
	backgroundColor: '#cdc9c9',
	borderColor: '#000000',
	height : '100%',
	width : '100%',
});

var soum_window = Ti.UI.createWindow({
	url: '/Storitve/soumNovice.js',
	backgroundColor: '#cdc9c9',
	borderColor: '#000000',
	height : '100%',
	width : '100%',
});

var zagovori_window = Ti.UI.createWindow({
	url: '/Storitve/zagovori.js',
	backgroundColor: '#cdc9c9',
	borderColor: '#000000',
	height : '100%',
	width : '100%',
});

var noviceUM_window = Ti.UI.createWindow({
	url: '/Storitve/noviceUM.js',
	backgroundColor: '#cdc9c9',
	borderColor: '#000000',
	height : '100%',
	width : '100%',
});

var aips_window = Ti.UI.createWindow({
	url: '/Storitve/aips.js',
	backgroundColor: '#cdc9c9',
	borderColor: '#000000',
	height : '100%',
	width : '100%',
});

var aipsNapredno_window = Ti.UI.createWindow({
	url: '/Storitve/aipsNapredno.js',
	backgroundColor: '#cdc9c9',
	borderColor: '#000000',
	height : '100%',
	width : '100%',
});

var scroler = Ti.UI.createScrollView({
	contentHeight: 'auto',
	contentWidth: 'auto',
	top: 0,
	showVerticalScrollIndicator: false,
	showHorizontalScrollIndicator: false,
})


// Vreme
var buttonVreme1 = Ti.UI.createButton({
	backgroundImage: '/Slike/Vreme_izbrano.png',
	borderColor: '#000000',
	borderRadius: 10,
	borderWidth: 2,
	height : '200dip',
	width : '96%',
	top : '2dip',
	left : '2%',
});

// Listen for click events.
buttonVreme1.addEventListener('click', function() {
	vreme_window.open({modal:true});
});

scroler.add(buttonVreme1);

// Feri news
var buttonFeriNews = Ti.UI.createButton({	
	backgroundImage: '/Slike/feri-novice.png',
	borderColor: '#000000',
	borderRadius: 10,
	borderWidth: 2,
	height : '200dip',
	width : '96%',
	top : '204dip',
	left : '2%',
});

// Listen for click events.
buttonFeriNews.addEventListener('click', function() {
	feriNovice_window.open({modal:true});
	
});

// Add to the parent view.
scroler.add(buttonFeriNews);

// Feri forum
var buttonFeriForum = Ti.UI.createButton({	
	backgroundImage: '/Slike/feri-forum.png',
	borderColor: '#000000',
	borderRadius: 10,
	borderWidth: 2,
	height : '200dip',
	width : '96%',
	top : '406dip',
	left : '2%',
});

// Listen for click events.
buttonFeriForum.addEventListener('click', function() {
	feriForum_window.open({modal:true});
});

scroler.add(buttonFeriForum);

// AIPS
var buttonAips = Ti.UI.createButton({	
	backgroundImage: '/Slike/aips.png',
	borderColor: '#000000',
	borderRadius: 10,
	borderWidth: 2,
	height : '200dip',
	width : '96%',
	top : '608dip',
	left : '2%',
});

scroler.add(buttonAips);

// Listen for click events.
buttonAips.addEventListener('click', function() {
	aips_window.open({modal:true});
});

// AIPS napredno
var buttonAipsNapredno = Ti.UI.createButton({	
	backgroundImage: '/Slike/aips.png',
	borderColor: '#000000',
	borderRadius: 10,
	borderWidth: 2,
	height : '200dip',
	width : '96%',
	top : '608dip',
	left : '2%',
});

scroler.add(buttonAipsNapredno);

// Listen for click events.
buttonAipsNapredno.addEventListener('click', function() {
	aipsNapredno_window.open({modal:true});
});

// UM novice
var buttonUMNovice = Ti.UI.createButton({	
	backgroundImage: '/Slike/um-novice.png',
	borderColor: '#000000',
	borderRadius: 10,
	borderWidth: 2,
	height : '200dip',
	width : '96%',
	top : '810dip',
	left : '2%',
});

scroler.add(buttonUMNovice);

// Listen for click events.
buttonUMNovice.addEventListener('click', function() {
	noviceUM_window.open({modal:true});
});


// Stuk program
var buttonStukProgram = Ti.UI.createButton({	
	backgroundImage: '/Slike/stuk-program.png',
	borderColor: '#000000',
	borderRadius: 10,
	borderWidth: 2,
	height : '200dip',
	width : '96%',
	top : '1012dip',
	left : '2%',
});

scroler.add(buttonStukProgram);

// Listen for click events.
buttonStukProgram.addEventListener('click', function() {
	stuk_window.open({modal:true});
});

// Out of box program
var buttonOutOfBoxProgram = Ti.UI.createButton({	
	backgroundImage: '/Slike/ofb-program.png',
	borderColor: '#000000',
	borderRadius: 10,
	borderWidth: 2,
	height : '200dip',
	width : '96%',
	top : '1214dip',
	left : '2%',
});

scroler.add(buttonOutOfBoxProgram);

// Soum novice
var buttonSoumNovice = Ti.UI.createButton({	
	backgroundImage: '/Slike/soum-novice.png',
	borderColor: '#000000',
	borderRadius: 10,
	borderWidth: 2,
	height : '200dip',
	width : '96%',
	top : '1416dip',
	left : '2%',
});

scroler.add(buttonSoumNovice);

// Listen for click events.
buttonSoumNovice.addEventListener('click', function() {
	soum_window.open({modal:true});
});

// Feri zagovori
var buttonFeriZagovori = Ti.UI.createButton({	
	backgroundImage: '/Slike/feri-zagovori.png',
	borderColor: '#000000',
	borderRadius: 10,
	borderWidth: 2,
	height : '200dip',
	width : '96%',
	top : '1618dip',
	left : '2%',
});

scroler.add(buttonFeriZagovori);

// Listen for click events.
buttonFeriZagovori.addEventListener('click', function() {
	zagovori_window.open({modal:true});
});

win.add(scroler);
win.open();